package dfl.bysj.entity.VO;

import com.baomidou.mybatisplus.annotation.TableId;
import com.sun.istack.internal.NotNull;
import dfl.bysj.entity.Academy;
import dfl.bysj.entity.Grade;
import dfl.bysj.entity.Student;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import java.io.Serializable;

/**
 * @Author: DFL
 * @Data: 2022/4/1813:28
 */
@Data
@ToString
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="StudentVO对象", description="")
public class StudentVO implements Serializable {

    private static final long serialVersionUID = 1L;
    private Long stuId;

    private String stuName;

    /**
     * 前端传到后端时，字符串转成整数类型的大小超过这个值
     */
    private Long stuPhone;
    private String academy;
    private String grade;

    private String openId;

    public StudentVO() {
    }

    public StudentVO(Student student, Grade grade, Academy academy) {
        this.stuId= Long.valueOf(student.getStuId());
        this.stuPhone= Long.valueOf(student.getStuPhone());
        this.stuName=student.getStuName();
        this.grade=grade.getGraName();
        this.academy=academy.getAcaName();
    }
}
